<%@ page contentType="text/html;charset=UTF-8"%>
<jsp:directive.include file="/WEB-INF/view/jsp/admin/includes/top.jsp" />
<h3>
	基本设置
</h3>
<form id="inputForm" name="inputForm"
	action="${ctx}/admin/setting!saveAll.do" method="post">
	<table class="from-table">
		<c:forEach var="setting" items="${settings}">
			<tr>
				<td width="200">
					${setting.displayName}：
				</td>
				<td>
					<c:choose>
						<c:when test="${setting.name=='huoshow_id_register_level'}">
							<select name="setting_${setting.name}">
								<c:forEach var="huoshowIdLevel" items="${huoshowIdLevels}">
									<option value="<c:out value="${huoshowIdLevel.key}"/>"
										<c:if test="${huoshowIdLevel.key == setting.value}">selected="selected"</c:if>>
										<c:out value="${huoshowIdLevel.value}" />
									</option>
								</c:forEach>
							</select>
						</c:when>
						<c:when test="${setting.name=='credit_transfer'}">
							<select name="setting_${setting.name}">
								<c:forEach var="creditType" items="${creditTypes}">
									<option value="<c:out value="${creditType.name}"/>"
										<c:if test="${creditType.name == setting.value}">selected="selected"</c:if>>
										<c:out value="${creditType.title}" />
									</option>
								</c:forEach>
							</select>
						</c:when>
						<c:otherwise>
							<input type="text" name="setting_${setting.name}"
								value="${setting.value}" size="30" maxlength="100"
								style="width: 200px;" class="txt" />
						</c:otherwise>
					</c:choose>
				</td>
				<td>
					${setting.description}
				</td>
				<!-- 
									<td width="30">
										<a href="#" class="ref"
											onclick="deleData('${ctx}/admin/setting!delete.do?id=${setting.id}')">删除</a>
									</td>
									 -->
			</tr>
		</c:forEach>
		<tr>
			<td>
				&nbsp;
			</td>
			<td>
				<input type="submit" value="保存" class="btn" />
				<input type="button" value='增加新参数'
					onclick="location.href='${ctx}/admin/setting!input.do'" class="btn" />
			</td>
		</tr>
	</table>
</form>
<jsp:directive.include
	file="/WEB-INF/view/jsp/admin/includes/bottom.jsp" />